﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.PolicyObject
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;
using TaleWorlds.Core;
using TaleWorlds.Library;
using TaleWorlds.Localization;
using TaleWorlds.ObjectSystem;

#nullable disable
namespace TaleWorlds.CampaignSystem
{
  public sealed class PolicyObject : PropertyObject
  {
    internal static void AutoGeneratedStaticCollectObjectsPolicyObject(
      object o,
      List<object> collectedObjects)
    {
      ((MBObjectBase) o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    public static MBReadOnlyList<PolicyObject> All => Campaign.Current.AllPolicies;

    public TextObject SecondaryEffects { get; private set; }

    public float AuthoritarianWeight { get; private set; }

    public float OligarchicWeight { get; private set; }

    public float EgalitarianWeight { get; private set; }

    public TextObject LogEntryDescription { get; private set; }

    public PolicyObject(string stringId)
      : base(stringId)
    {
    }

    public void Initialize(
      TextObject name,
      TextObject description,
      TextObject logEntryDescription,
      TextObject secondaryEffects,
      float authoritarianWeight,
      float oligarchyWeight,
      float egalitarianWeight)
    {
      this.Initialize(name, description);
      this.LogEntryDescription = logEntryDescription;
      this.SecondaryEffects = secondaryEffects;
      this.AuthoritarianWeight = authoritarianWeight;
      this.OligarchicWeight = oligarchyWeight;
      this.EgalitarianWeight = egalitarianWeight;
      this.AfterInitialized();
    }

    public override string ToString() => this.Name.ToString();
  }
}
